import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  base: '/',
  build: {
    outDir: "./five-elements-calculator",
    rollupOptions: {
      output: {
        manualChunks: {
          vendor: ['vue', 'axios'],
          // Add other large dependencies to separate chunks if needed
        }
      }
    },
    // Optional: Increase warning threshold if needed
    chunkSizeWarningLimit: 1000
  },
  plugins: [vue()],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  server: {
    host: "localhost",
    open: true,
    port: 5173
  }
})


